<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>navigator</title>
    <script type="text/javascript">
        window.onload=function () {
            var browsername=navigator.appName;
            var vertion=parseFloat(navigator.appVersion);
            if ((browsername=="Netscape"||browsername=="Micorsoft Internet Explorer")&&(vertion>=4)){
                alert("你的浏览器已经很棒了");}
                else{alert("你的浏览器需要升级了");}
        }
        document.write("浏览器："+navigator.appName+"<br>");
        document.write("浏览器版本："+navigator.appVersion+"<br>");
        document.write("代码："+navigator.appCodeName+"<br>");
        document.write("平台："+navigator.platform+"<br>");
        document.write("cookies启用："+navigator.cookieEnabled+"<br>");
        document.write("浏览器用户代理报头："+navigator.userAgent+"<br>");
    </script>
</head>
<body>

</body>
</html>